package com.web.common.dataDictionary.PO;

import java.util.BitSet;
import java.util.HashMap;
import java.util.Map;

import com.css.sword.kernel.base.annotation.PersistObject;
import com.css.sword.kernel.base.dataElement.AbsPersistObject;
import com.css.sword.kernel.base.dataElement.BaseDataElement;
import com.css.sword.kernel.base.dataElement.DateDE;
import com.css.sword.kernel.base.exception.SwordBaseCheckedException;
import com.web.common.dataDictionary.DE.DE_HD_DETAIL;
import com.web.common.dataDictionary.DE.DE_HD_DJJ;
import com.web.common.dataDictionary.DE.DE_HD_FQRLXFS;
import com.web.common.dataDictionary.DE.DE_HD_FQRXM;
import com.web.common.dataDictionary.DE.DE_HD_FQSJ;
import com.web.common.dataDictionary.DE.DE_HD_JSSJ;
import com.web.common.dataDictionary.DE.DE_HD_KSSJ;
import com.web.common.dataDictionary.DE.DE_HD_LOGO;
import com.web.common.dataDictionary.DE.DE_HD_SHSJ;
import com.web.common.dataDictionary.DE.DE_HD_SHZT;
import com.web.common.dataDictionary.DE.DE_HD_TITLE;
import com.web.common.dataDictionary.DE.DE_HD_WEBDOMAIN;
import com.web.common.dataDictionary.DE.DE_HD_WEBPATH;
import com.web.common.dataDictionary.DE.DE_ID;
import com.web.common.dataDictionary.DE.DE_WEBUSERNAME;


/**
 * 活动表
 */
@PersistObject
public class TabActivityPO extends AbsPersistObject {
	//private static final long serialVersionUID = -5064791015812069684L;
	private static final long serialVersionUID = 1L;
	private static final Map<String, Integer> fieldIndex = new HashMap<String, Integer>(15);
	private static final BitSet HAS_DEFAULT_VALUE = new BitSet(15);
	
	static{
		fieldIndex.put("id",0);fieldIndex.put("webusername",1);fieldIndex.put("hdTitle",2);fieldIndex.put("hdKssj",3);fieldIndex.put("hdJssj",4);fieldIndex.put("hdFqrxm",5);fieldIndex.put("hdFqrlxfs",6);fieldIndex.put("hdFqsj",7);fieldIndex.put("hdShzt",8);fieldIndex.put("hdShsj",9);fieldIndex.put("hdWebpath",10);fieldIndex.put("hdWebdomain",11);fieldIndex.put("hdLogo",12);fieldIndex.put("hdDjj",13);fieldIndex.put("hdDetail",14);
	}
	
	/**
	 * 物理表名
	 */
	public static final String TABLE_NAME = "tab_activity";

	/**
	 * 主键id
	 */
	private DE_ID id = DE_ID.getTemplateInstance();

	/**
	 * web用户名
	 */
	private DE_WEBUSERNAME webusername = DE_WEBUSERNAME.getTemplateInstance();

	/**
	 * 活动标题
	 */
	private DE_HD_TITLE hdTitle = DE_HD_TITLE.getTemplateInstance();

	/**
	 * 活动开始时间
	 */
	private DE_HD_KSSJ hdKssj = DE_HD_KSSJ.getTemplateInstance();

	/**
	 * 活动结束时间
	 */
	private DE_HD_JSSJ hdJssj = DE_HD_JSSJ.getTemplateInstance();

	/**
	 * 活动发起人姓名
	 */
	private DE_HD_FQRXM hdFqrxm = DE_HD_FQRXM.getTemplateInstance();

	/**
	 * 活动发起人联系方式
	 */
	private DE_HD_FQRLXFS hdFqrlxfs = DE_HD_FQRLXFS.getTemplateInstance();

	/**
	 * 活动发起时间
	 */
	private DE_HD_FQSJ hdFqsj = DE_HD_FQSJ.getTemplateInstance();

	/**
	 * 活动审核状态
	 */
	private DE_HD_SHZT hdShzt = DE_HD_SHZT.getTemplateInstance();

	/**
	 * 活动审核时间
	 */
	private DE_HD_SHSJ hdShsj = DE_HD_SHSJ.getTemplateInstance();

	/**
	 * 生成活动的详情web页面
	 */
	private DE_HD_WEBPATH hdWebpath = DE_HD_WEBPATH.getTemplateInstance();

	/**
	 * 活动生成的web页的访问主路径
	 */
	private DE_HD_WEBDOMAIN hdWebdomain = DE_HD_WEBDOMAIN.getTemplateInstance();

	/**
	 * 活动logo
	 */
	private DE_HD_LOGO hdLogo = DE_HD_LOGO.getTemplateInstance();

	/**
	 * 活动短简介
	 */
	private DE_HD_DJJ hdDjj = DE_HD_DJJ.getTemplateInstance();

	/**
	 * 活动详情
	 */
	private DE_HD_DETAIL hdDetail = DE_HD_DETAIL.getTemplateInstance();


	public TabActivityPO(){
		this.insertState = new BitSet(15);
		this.updateState = new BitSet(15);
	}

	
	/**
	 * 获取 "主键id" 值
	 */	
	public DE_ID getId(){
		return  id;
	}
	
	/**
	 * 设置 "主键id" 值
	 */
	public void setId(DE_ID id) {
		if(id == null){
			id= DE_ID.getTemplateInstance();
		}
		recordChangeFlag(0);
		this.id = id;
	}
	
	/**
	 * 获取 "web用户名" 值
	 */	
	public DE_WEBUSERNAME getWebusername(){
		return  webusername;
	}
	
	/**
	 * 设置 "web用户名" 值
	 */
	public void setWebusername(DE_WEBUSERNAME webusername) {
		if(webusername == null){
			webusername= DE_WEBUSERNAME.getTemplateInstance();
		}
		recordChangeFlag(1);
		this.webusername = webusername;
	}
	
	/**
	 * 获取 "活动标题" 值
	 */	
	public DE_HD_TITLE getHdTitle(){
		return  hdTitle;
	}
	
	/**
	 * 设置 "活动标题" 值
	 */
	public void setHdTitle(DE_HD_TITLE hdTitle) {
		if(hdTitle == null){
			hdTitle= DE_HD_TITLE.getTemplateInstance();
		}
		recordChangeFlag(2);
		this.hdTitle = hdTitle;
	}
	
	/**
	 * 获取 "活动开始时间" 值
	 */	
	public DE_HD_KSSJ getHdKssj(){
		return  hdKssj;
	}
	
	/**
	 * 设置 "活动开始时间" 值
	 */
	public void setHdKssj(DE_HD_KSSJ hdKssj) {
		if(hdKssj == null){
			hdKssj= DE_HD_KSSJ.getTemplateInstance();
		}
		recordChangeFlag(3);
		this.hdKssj = hdKssj;
	}
	
	/**
	 * 获取 "活动结束时间" 值
	 */	
	public DE_HD_JSSJ getHdJssj(){
		return  hdJssj;
	}
	
	/**
	 * 设置 "活动结束时间" 值
	 */
	public void setHdJssj(DE_HD_JSSJ hdJssj) {
		if(hdJssj == null){
			hdJssj= DE_HD_JSSJ.getTemplateInstance();
		}
		recordChangeFlag(4);
		this.hdJssj = hdJssj;
	}
	
	/**
	 * 获取 "活动发起人姓名" 值
	 */	
	public DE_HD_FQRXM getHdFqrxm(){
		return  hdFqrxm;
	}
	
	/**
	 * 设置 "活动发起人姓名" 值
	 */
	public void setHdFqrxm(DE_HD_FQRXM hdFqrxm) {
		if(hdFqrxm == null){
			hdFqrxm= DE_HD_FQRXM.getTemplateInstance();
		}
		recordChangeFlag(5);
		this.hdFqrxm = hdFqrxm;
	}
	
	/**
	 * 获取 "活动发起人联系方式" 值
	 */	
	public DE_HD_FQRLXFS getHdFqrlxfs(){
		return  hdFqrlxfs;
	}
	
	/**
	 * 设置 "活动发起人联系方式" 值
	 */
	public void setHdFqrlxfs(DE_HD_FQRLXFS hdFqrlxfs) {
		if(hdFqrlxfs == null){
			hdFqrlxfs= DE_HD_FQRLXFS.getTemplateInstance();
		}
		recordChangeFlag(6);
		this.hdFqrlxfs = hdFqrlxfs;
	}
	
	/**
	 * 获取 "活动发起时间" 值
	 */	
	public DE_HD_FQSJ getHdFqsj(){
		return  hdFqsj;
	}
	
	/**
	 * 设置 "活动发起时间" 值
	 */
	public void setHdFqsj(DE_HD_FQSJ hdFqsj) {
		if(hdFqsj == null){
			hdFqsj= DE_HD_FQSJ.getTemplateInstance();
		}
		recordChangeFlag(7);
		this.hdFqsj = hdFqsj;
	}
	
	/**
	 * 获取 "活动审核状态" 值
	 */	
	public DE_HD_SHZT getHdShzt(){
		return  hdShzt;
	}
	
	/**
	 * 设置 "活动审核状态" 值
	 */
	public void setHdShzt(DE_HD_SHZT hdShzt) {
		if(hdShzt == null){
			hdShzt= DE_HD_SHZT.getTemplateInstance();
		}
		recordChangeFlag(8);
		this.hdShzt = hdShzt;
	}
	
	/**
	 * 获取 "活动审核时间" 值
	 */	
	public DE_HD_SHSJ getHdShsj(){
		return  hdShsj;
	}
	
	/**
	 * 设置 "活动审核时间" 值
	 */
	public void setHdShsj(DE_HD_SHSJ hdShsj) {
		if(hdShsj == null){
			hdShsj= DE_HD_SHSJ.getTemplateInstance();
		}
		recordChangeFlag(9);
		this.hdShsj = hdShsj;
	}
	
	/**
	 * 获取 "生成活动的详情web页面" 值
	 */	
	public DE_HD_WEBPATH getHdWebpath(){
		return  hdWebpath;
	}
	
	/**
	 * 设置 "生成活动的详情web页面" 值
	 */
	public void setHdWebpath(DE_HD_WEBPATH hdWebpath) {
		if(hdWebpath == null){
			hdWebpath= DE_HD_WEBPATH.getTemplateInstance();
		}
		recordChangeFlag(10);
		this.hdWebpath = hdWebpath;
	}
	
	/**
	 * 获取 "活动生成的web页的访问主路径" 值
	 */	
	public DE_HD_WEBDOMAIN getHdWebdomain(){
		return  hdWebdomain;
	}
	
	/**
	 * 设置 "活动生成的web页的访问主路径" 值
	 */
	public void setHdWebdomain(DE_HD_WEBDOMAIN hdWebdomain) {
		if(hdWebdomain == null){
			hdWebdomain= DE_HD_WEBDOMAIN.getTemplateInstance();
		}
		recordChangeFlag(11);
		this.hdWebdomain = hdWebdomain;
	}
	
	/**
	 * 获取 "活动logo" 值
	 */	
	public DE_HD_LOGO getHdLogo(){
		return  hdLogo;
	}
	
	/**
	 * 设置 "活动logo" 值
	 */
	public void setHdLogo(DE_HD_LOGO hdLogo) {
		if(hdLogo == null){
			hdLogo= DE_HD_LOGO.getTemplateInstance();
		}
		recordChangeFlag(12);
		this.hdLogo = hdLogo;
	}
	
	/**
	 * 获取 "活动短简介" 值
	 */	
	public DE_HD_DJJ getHdDjj(){
		return  hdDjj;
	}
	
	/**
	 * 设置 "活动短简介" 值
	 */
	public void setHdDjj(DE_HD_DJJ hdDjj) {
		if(hdDjj == null){
			hdDjj= DE_HD_DJJ.getTemplateInstance();
		}
		recordChangeFlag(13);
		this.hdDjj = hdDjj;
	}
	
	/**
	 * 获取 "活动详情" 值
	 */	
	public DE_HD_DETAIL getHdDetail(){
		return  hdDetail;
	}
	
	/**
	 * 设置 "活动详情" 值
	 */
	public void setHdDetail(DE_HD_DETAIL hdDetail) {
		if(hdDetail == null){
			hdDetail= DE_HD_DETAIL.getTemplateInstance();
		}
		recordChangeFlag(14);
		this.hdDetail = hdDetail;
	}


	@Override
	public BaseDataElement<?>[] fields(){
		return new BaseDataElement<?>[] {id,webusername,hdTitle,hdKssj,hdJssj,hdFqrxm,hdFqrlxfs,hdFqsj,hdShzt,hdShsj,hdWebpath,hdWebdomain,hdLogo,hdDjj,hdDetail};
	}
	
	@Override
	public String[] fieldNames() {
		return new String[]{"id","webusername","hdTitle","hdKssj","hdJssj","hdFqrxm","hdFqrlxfs","hdFqsj","hdShzt","hdShsj","hdWebpath","hdWebdomain","hdLogo","hdDjj","hdDetail"};
	}
	
	@Override
	public BaseDataElement<?> getFieldValue(String fieldName)  {
		final Integer index = fieldIndex.get(fieldName);
		if (index == null) {
			throw new IllegalArgumentException("PO对象中没有" + fieldName + "字段");
		}
		switch (index) {
		case 0 : return id;
		case 1 : return webusername;
		case 2 : return hdTitle;
		case 3 : return hdKssj;
		case 4 : return hdJssj;
		case 5 : return hdFqrxm;
		case 6 : return hdFqrlxfs;
		case 7 : return hdFqsj;
		case 8 : return hdShzt;
		case 9 : return hdShsj;
		case 10 : return hdWebpath;
		case 11 : return hdWebdomain;
		case 12 : return hdLogo;
		case 13 : return hdDjj;
		case 14 : return hdDetail;
 
		default:
			throw new IllegalArgumentException("PO对象中没有" + fieldName + "字段");
		}
	}
	
	@Override
	public TabActivityPO setFieldValue(String fieldName, Object fieldValue) throws SwordBaseCheckedException {
		if (fieldValue != null && !(fieldValue instanceof BaseDataElement<?>)) {
			throw new SwordBaseCheckedException("字段值类型不是DataElelement子类型");
		}

		final Integer index = fieldIndex.get(fieldName);
		if (index == null) {
			throw new SwordBaseCheckedException("PO对象中没有" + fieldName + "字段");
		}

		switch (index) {

				case 0 : {
					if (fieldValue == null) {
						setId(null);
					} else {
						setId((DE_ID) fieldValue);
					}
					return this;
				}
				
				case 1 : {
					if (fieldValue == null) {
						setWebusername(null);
					} else {
						setWebusername((DE_WEBUSERNAME) fieldValue);
					}
					return this;
				}
				
				case 2 : {
					if (fieldValue == null) {
						setHdTitle(null);
					} else {
						setHdTitle((DE_HD_TITLE) fieldValue);
					}
					return this;
				}
				
				case 3 : {
					if (fieldValue == null) {
						setHdKssj(null);
					} else {
						setHdKssj((DE_HD_KSSJ) fieldValue);
					}
					return this;
				}
				
				case 4 : {
					if (fieldValue == null) {
						setHdJssj(null);
					} else {
						setHdJssj((DE_HD_JSSJ) fieldValue);
					}
					return this;
				}
				
				case 5 : {
					if (fieldValue == null) {
						setHdFqrxm(null);
					} else {
						setHdFqrxm((DE_HD_FQRXM) fieldValue);
					}
					return this;
				}
				
				case 6 : {
					if (fieldValue == null) {
						setHdFqrlxfs(null);
					} else {
						setHdFqrlxfs((DE_HD_FQRLXFS) fieldValue);
					}
					return this;
				}
				
				case 7 : {
					if (fieldValue == null) {
						setHdFqsj(null);
					} else {
						setHdFqsj((DE_HD_FQSJ) fieldValue);
					}
					return this;
				}
				
				case 8 : {
					if (fieldValue == null) {
						setHdShzt(null);
					} else {
						setHdShzt((DE_HD_SHZT) fieldValue);
					}
					return this;
				}
				
				case 9 : {
					if (fieldValue == null) {
						setHdShsj(null);
					} else {
						setHdShsj((DE_HD_SHSJ) fieldValue);
					}
					return this;
				}
				
				case 10 : {
					if (fieldValue == null) {
						setHdWebpath(null);
					} else {
						setHdWebpath((DE_HD_WEBPATH) fieldValue);
					}
					return this;
				}
				
				case 11 : {
					if (fieldValue == null) {
						setHdWebdomain(null);
					} else {
						setHdWebdomain((DE_HD_WEBDOMAIN) fieldValue);
					}
					return this;
				}
				
				case 12 : {
					if (fieldValue == null) {
						setHdLogo(null);
					} else {
						setHdLogo((DE_HD_LOGO) fieldValue);
					}
					return this;
				}
				
				case 13 : {
					if (fieldValue == null) {
						setHdDjj(null);
					} else {
						setHdDjj((DE_HD_DJJ) fieldValue);
					}
					return this;
				}
				
				case 14 : {
					if (fieldValue == null) {
						setHdDetail(null);
					} else {
						setHdDetail((DE_HD_DETAIL) fieldValue);
					}
					return this;
				}
				
		default:
			throw new SwordBaseCheckedException("PO对象中没有" + fieldName + "字段");
		}
	
	}

	@Override
	protected TabActivityPO clone() {
		TabActivityPO t = new TabActivityPO();
		
		t.setId(this.id);
		t.setWebusername(this.webusername);
		t.setHdTitle(this.hdTitle);
		t.setHdKssj(this.hdKssj);
		t.setHdJssj(this.hdJssj);
		t.setHdFqrxm(this.hdFqrxm);
		t.setHdFqrlxfs(this.hdFqrlxfs);
		t.setHdFqsj(this.hdFqsj);
		t.setHdShzt(this.hdShzt);
		t.setHdShsj(this.hdShsj);
		t.setHdWebpath(this.hdWebpath);
		t.setHdWebdomain(this.hdWebdomain);
		t.setHdLogo(this.hdLogo);
		t.setHdDjj(this.hdDjj);
		t.setHdDetail(this.hdDetail);

		return t;
	}

	@Override
	public TabActivityPO loadMap(Map<String, Object> dataMap) throws SwordBaseCheckedException {
		Object value = null;

		if(dataMap.containsKey("id")){
			value = dataMap.get("id");
			
			if (value == null) {
				this.setId(null);
			} else {
				if (value instanceof DE_ID) {
					this.setId((DE_ID) value);
				}
			    else {
					this.setId(new DE_ID(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("webusername")){
			value = dataMap.get("webusername");
			
			if (value == null) {
				this.setWebusername(null);
			} else {
				if (value instanceof DE_WEBUSERNAME) {
					this.setWebusername((DE_WEBUSERNAME) value);
				}
			    else {
					this.setWebusername(new DE_WEBUSERNAME(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("hdTitle")){
			value = dataMap.get("hdTitle");
			
			if (value == null) {
				this.setHdTitle(null);
			} else {
				if (value instanceof DE_HD_TITLE) {
					this.setHdTitle((DE_HD_TITLE) value);
				}
			    else {
					this.setHdTitle(new DE_HD_TITLE(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("hdKssj")){
			value = dataMap.get("hdKssj");
			
			if (value == null) {
				this.setHdKssj(null);
			} else {
				if (value instanceof DE_HD_KSSJ) {
					this.setHdKssj((DE_HD_KSSJ) value);
				}
				else if(value instanceof java.util.Date){
					this.setHdKssj(new DE_HD_KSSJ((java.util.Date)value));
				}
			    else {
					this.setHdKssj(new DE_HD_KSSJ(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("hdJssj")){
			value = dataMap.get("hdJssj");
			
			if (value == null) {
				this.setHdJssj(null);
			} else {
				if (value instanceof DE_HD_JSSJ) {
					this.setHdJssj((DE_HD_JSSJ) value);
				}
				else if(value instanceof java.util.Date){
					this.setHdJssj(new DE_HD_JSSJ((java.util.Date)value));
				}
			    else {
					this.setHdJssj(new DE_HD_JSSJ(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("hdFqrxm")){
			value = dataMap.get("hdFqrxm");
			
			if (value == null) {
				this.setHdFqrxm(null);
			} else {
				if (value instanceof DE_HD_FQRXM) {
					this.setHdFqrxm((DE_HD_FQRXM) value);
				}
			    else {
					this.setHdFqrxm(new DE_HD_FQRXM(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("hdFqrlxfs")){
			value = dataMap.get("hdFqrlxfs");
			
			if (value == null) {
				this.setHdFqrlxfs(null);
			} else {
				if (value instanceof DE_HD_FQRLXFS) {
					this.setHdFqrlxfs((DE_HD_FQRLXFS) value);
				}
			    else {
					this.setHdFqrlxfs(new DE_HD_FQRLXFS(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("hdFqsj")){
			value = dataMap.get("hdFqsj");
			
			if (value == null) {
				this.setHdFqsj(null);
			} else {
				if (value instanceof DE_HD_FQSJ) {
					this.setHdFqsj((DE_HD_FQSJ) value);
				}
				else if(value instanceof java.util.Date){
					this.setHdFqsj(new DE_HD_FQSJ((java.util.Date)value));
				}
			    else {
					this.setHdFqsj(new DE_HD_FQSJ(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("hdShzt")){
			value = dataMap.get("hdShzt");
			
			if (value == null) {
				this.setHdShzt(null);
			} else {
				if (value instanceof DE_HD_SHZT) {
					this.setHdShzt((DE_HD_SHZT) value);
				}
			    else {
					this.setHdShzt(new DE_HD_SHZT(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("hdShsj")){
			value = dataMap.get("hdShsj");
			
			if (value == null) {
				this.setHdShsj(null);
			} else {
				if (value instanceof DE_HD_SHSJ) {
					this.setHdShsj((DE_HD_SHSJ) value);
				}
				else if(value instanceof java.util.Date){
					this.setHdShsj(new DE_HD_SHSJ((java.util.Date)value));
				}
			    else {
					this.setHdShsj(new DE_HD_SHSJ(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("hdWebpath")){
			value = dataMap.get("hdWebpath");
			
			if (value == null) {
				this.setHdWebpath(null);
			} else {
				if (value instanceof DE_HD_WEBPATH) {
					this.setHdWebpath((DE_HD_WEBPATH) value);
				}
			    else {
					this.setHdWebpath(new DE_HD_WEBPATH(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("hdWebdomain")){
			value = dataMap.get("hdWebdomain");
			
			if (value == null) {
				this.setHdWebdomain(null);
			} else {
				if (value instanceof DE_HD_WEBDOMAIN) {
					this.setHdWebdomain((DE_HD_WEBDOMAIN) value);
				}
			    else {
					this.setHdWebdomain(new DE_HD_WEBDOMAIN(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("hdLogo")){
			value = dataMap.get("hdLogo");
			
			if (value == null) {
				this.setHdLogo(null);
			} else {
				if (value instanceof DE_HD_LOGO) {
					this.setHdLogo((DE_HD_LOGO) value);
				}
			    else {
					this.setHdLogo(new DE_HD_LOGO(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("hdDjj")){
			value = dataMap.get("hdDjj");
			
			if (value == null) {
				this.setHdDjj(null);
			} else {
				if (value instanceof DE_HD_DJJ) {
					this.setHdDjj((DE_HD_DJJ) value);
				}
			    else {
					this.setHdDjj(new DE_HD_DJJ(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("hdDetail")){
			value = dataMap.get("hdDetail");
			
			if (value == null) {
				this.setHdDetail(null);
			} else {
				if (value instanceof DE_HD_DETAIL) {
					this.setHdDetail((DE_HD_DETAIL) value);
				}
			    else {
					this.setHdDetail(new DE_HD_DETAIL(value.toString()));
				}
			}
		}

		return this;
	}
	
	@Override
	public Map<String,Object> toMap() {
		Map<String,Object> dataMap = new HashMap<String,Object>();

		dataMap.put("id", id);
		dataMap.put("webusername", webusername);
		dataMap.put("hdTitle", hdTitle);
		dataMap.put("hdKssj", hdKssj);
		dataMap.put("hdJssj", hdJssj);
		dataMap.put("hdFqrxm", hdFqrxm);
		dataMap.put("hdFqrlxfs", hdFqrlxfs);
		dataMap.put("hdFqsj", hdFqsj);
		dataMap.put("hdShzt", hdShzt);
		dataMap.put("hdShsj", hdShsj);
		dataMap.put("hdWebpath", hdWebpath);
		dataMap.put("hdWebdomain", hdWebdomain);
		dataMap.put("hdLogo", hdLogo);
		dataMap.put("hdDjj", hdDjj);
		dataMap.put("hdDetail", hdDetail);
		
		return dataMap;
	}
	
	@Override
	public Map<String,Object> toMapWithDEValue() {
		Map<String,Object> dataMap = new HashMap<String,Object>();

		dataMap.put("id", (id==null?null:id.value));
		dataMap.put("webusername", (webusername==null?null:webusername.value));
		dataMap.put("hdTitle", (hdTitle==null?null:hdTitle.value));
		dataMap.put("hdKssj", (hdKssj==null?null:hdKssj.value));
		dataMap.put("hdJssj", (hdJssj==null?null:hdJssj.value));
		dataMap.put("hdFqrxm", (hdFqrxm==null?null:hdFqrxm.value));
		dataMap.put("hdFqrlxfs", (hdFqrlxfs==null?null:hdFqrlxfs.value));
		dataMap.put("hdFqsj", (hdFqsj==null?null:hdFqsj.value));
		dataMap.put("hdShzt", (hdShzt==null?null:hdShzt.value));
		dataMap.put("hdShsj", (hdShsj==null?null:hdShsj.value));
		dataMap.put("hdWebpath", (hdWebpath==null?null:hdWebpath.value));
		dataMap.put("hdWebdomain", (hdWebdomain==null?null:hdWebdomain.value));
		dataMap.put("hdLogo", (hdLogo==null?null:hdLogo.value));
		dataMap.put("hdDjj", (hdDjj==null?null:hdDjj.value));
		dataMap.put("hdDetail", (hdDetail==null?null:hdDetail.value));
		
		return dataMap;
	}
	
	@Override
	public TabActivityPO newInstance() {
		return new TabActivityPO();
	}
	
	@Override
	public String getTableName(){
		return TABLE_NAME;
	}
	
	@Override
	public BaseDataElement<?>[] getPrimaryKey() {
		return new BaseDataElement<?>[]{id};
	}

	@Override
	public void checkNotNull(byte sqlType) throws SwordBaseCheckedException {
		StringBuilder errorMsg = new StringBuilder();
		// insert
		if (sqlType == 0) {
				//只校验不可为空但又没有默认值的字段
				if (id.value == null && !HAS_DEFAULT_VALUE.get(0)) {
					errorMsg.append("字段id不允许为空\n");
				}
				if (webusername.value == null && !HAS_DEFAULT_VALUE.get(1)) {
					errorMsg.append("字段webusername不允许为空\n");
				}

		}
		// update
		else if (sqlType == 1) {
		if (updateState.get(0) && id.value == null) {
			errorMsg.append("字段id不允许为空\n");
		}
		if (updateState.get(1) && webusername.value == null) {
			errorMsg.append("字段webusername不允许为空\n");
		}

		}
		
		if (errorMsg.length() > 0) {
			errorMsg.setLength(errorMsg.length() - 1);
			throw new SwordBaseCheckedException(errorMsg.toString());
		}
	}

	@Override
	public void updateLrrq(DateDE lrrq) {
	}

	@Override
	public void updateXgrq(DateDE xgrq) {
	}

	@Override
	public String toString() {
		StringBuilder str = new StringBuilder();
		str.append("id:").append(id.value!=null?id:"").append(" ").append("webusername:").append(webusername.value!=null?webusername:"").append(" ").append("hdTitle:").append(hdTitle.value!=null?hdTitle:"").append(" ").append("hdKssj:").append(hdKssj.value!=null?hdKssj:"").append(" ").append("hdJssj:").append(hdJssj.value!=null?hdJssj:"").append(" ").append("hdFqrxm:").append(hdFqrxm.value!=null?hdFqrxm:"").append(" ").append("hdFqrlxfs:").append(hdFqrlxfs.value!=null?hdFqrlxfs:"").append(" ").append("hdFqsj:").append(hdFqsj.value!=null?hdFqsj:"").append(" ").append("hdShzt:").append(hdShzt.value!=null?hdShzt:"").append(" ").append("hdShsj:").append(hdShsj.value!=null?hdShsj:"").append(" ").append("hdWebpath:").append(hdWebpath.value!=null?hdWebpath:"").append(" ").append("hdWebdomain:").append(hdWebdomain.value!=null?hdWebdomain:"").append(" ").append("hdLogo:").append(hdLogo.value!=null?hdLogo:"").append(" ").append("hdDjj:").append(hdDjj.value!=null?hdDjj:"").append(" ").append("hdDetail:").append(hdDetail.value!=null?hdDetail:"").append(" ");
		return str.toString();
	}
	
}
